aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-28 00:06:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-28 00:06:43 +0000
commitea163989db9bd2605829c72cf5eb68b94f145288 (patch)
tree9e31bf2ce6d23c8db232d172c4714766069eaadf
parent5bd4e77c932841fa3babbf69617a17747201ef21 (diff)
downloadpaludis-ea163989db9bd2605829c72cf5eb68b94f145288.tar.gz
paludis-ea163989db9bd2605829c72cf5eb68b94f145288.tar.xz
Add fifo, device support throughout
-rw-r--r--paludis/contents.cc12
-rw-r--r--paludis/contents.hh52
-rw-r--r--paludis/repositories/vdb/vdb_repository.cc4
-rw-r--r--src/clients/paludis/do_contents.cc12
-rw-r--r--src/clients/paludis/owner.cc12
-rw-r--r--src/output/colour.hh4
6 files changed, 90 insertions, 6 deletions
diff --git a/paludis/contents.cc b/paludis/contents.cc
index 5945f22..b643238 100644
--- a/paludis/contents.cc
+++ b/paludis/contents.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -47,6 +47,16 @@ ContentsMiscEntry::ContentsMiscEntry(const std::string & our_name) :
{
}
+ContentsFifoEntry::ContentsFifoEntry(const std::string & our_name) :
+ ContentsEntry(our_name)
+{
+}
+
+ContentsDevEntry::ContentsDevEntry(const std::string & our_name) :
+ ContentsEntry(our_name)
+{
+}
+
ContentsSymEntry::ContentsSymEntry(const std::string & our_name, const std::string & our_target) :
ContentsEntry(our_name),
_target(our_target)
diff --git a/paludis/contents.hh b/paludis/contents.hh
index 281c26f..dab5794 100644
--- a/paludis/contents.hh
+++ b/paludis/contents.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -40,6 +40,8 @@ namespace paludis
struct ContentsFileEntry;
struct ContentsDirEntry;
struct ContentsSymEntry;
+ struct ContentsFifoEntry;
+ struct ContentsDevEntry;
struct ContentsMiscEntry;
/**
@@ -48,7 +50,7 @@ namespace paludis
* \ingroup grpcontents
*/
typedef VisitorTypes<ContentsFileEntry *, ContentsDirEntry *,
- ContentsSymEntry *, ContentsMiscEntry *> ContentsVisitorTypes;
+ ContentsSymEntry *, ContentsFifoEntry *, ContentsDevEntry *, ContentsMiscEntry *> ContentsVisitorTypes;
/**
* Base class for a contents entry.
@@ -160,6 +162,52 @@ namespace paludis
};
/**
+ * A fifo contents entry.
+ *
+ * \ingroup grpcontents
+ * \nosubgrouping
+ */
+ class ContentsFifoEntry :
+ public ContentsEntry,
+ public Visitable<ContentsFifoEntry, ContentsVisitorTypes>
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ ContentsFifoEntry(const std::string & name);
+
+ ///\}
+
+ typedef CountedPtr<ContentsFifoEntry, count_policy::InternalCountTag> Pointer;
+
+ typedef CountedPtr<const ContentsFifoEntry, count_policy::InternalCountTag> ConstPointer;
+ };
+
+ /**
+ * A device contents entry.
+ *
+ * \ingroup grpcontents
+ * \nosubgrouping
+ */
+ class ContentsDevEntry :
+ public ContentsEntry,
+ public Visitable<ContentsDevEntry, ContentsVisitorTypes>
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ ContentsDevEntry(const std::string & name);
+
+ ///\}
+
+ typedef CountedPtr<ContentsDevEntry, count_policy::InternalCountTag> Pointer;
+
+ typedef CountedPtr<const ContentsDevEntry, count_policy::InternalCountTag> ConstPointer;
+ };
+
+ /**
* A sym contents entry.
*
* \ingroup grpcontents
diff --git a/paludis/repositories/vdb/vdb_repository.cc b/paludis/repositories/vdb/vdb_repository.cc
index 369581f..9aa1b9f 100644
--- a/paludis/repositories/vdb/vdb_repository.cc
+++ b/paludis/repositories/vdb/vdb_repository.cc
@@ -729,6 +729,10 @@ VDBRepository::do_contents(
result->add(ContentsEntry::Pointer(new ContentsDirEntry(tokens.at(1))));
else if ("misc" == tokens.at(0))
result->add(ContentsEntry::Pointer(new ContentsMiscEntry(tokens.at(1))));
+ else if ("fif" == tokens.at(0))
+ result->add(ContentsEntry::Pointer(new ContentsFifoEntry(tokens.at(1))));
+ else if ("dev" == tokens.at(0))
+ result->add(ContentsEntry::Pointer(new ContentsDevEntry(tokens.at(1))));
else if ("sym" == tokens.at(0))
{
if (tokens.size() < 4)
diff --git a/src/clients/paludis/do_contents.cc b/src/clients/paludis/do_contents.cc
index a1a6e88..99a50b7 100644
--- a/src/clients/paludis/do_contents.cc
+++ b/src/clients/paludis/do_contents.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -54,6 +54,16 @@ namespace
{
cout << " " << colour(cl_misc, e->name()) << endl;
}
+
+ void visit(const p::ContentsFifoEntry * const e)
+ {
+ cout << " " << colour(cl_fifo, e->name()) << endl;
+ }
+
+ void visit(const p::ContentsDevEntry * const e)
+ {
+ cout << " " << colour(cl_dev, e->name()) << endl;
+ }
};
}
diff --git a/src/clients/paludis/owner.cc b/src/clients/paludis/owner.cc
index ce7fb08..d2893b0 100644
--- a/src/clients/paludis/owner.cc
+++ b/src/clients/paludis/owner.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -72,6 +72,16 @@ namespace
{
handle(e->name());
}
+
+ void visit(const p::ContentsFifoEntry * const e)
+ {
+ handle(e->name());
+ }
+
+ void visit(const p::ContentsDevEntry * const e)
+ {
+ handle(e->name());
+ }
};
}
diff --git a/src/output/colour.hh b/src/output/colour.hh
index b49b33f..06f1202 100644
--- a/src/output/colour.hh
+++ b/src/output/colour.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -75,6 +75,8 @@ enum Colour
cl_dir = cl_blue,
cl_sym = cl_pink,
cl_misc = cl_red,
+ cl_fifo = cl_red,
+ cl_dev = cl_red,
/* Contrarius colours */
cl_stage_short_name = cl_blue,