This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 02/11] Remove unused package_status_t stored in packageversion class
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Fri, 28 Apr 2017 13:11:56 +0100
- Subject: [PATCH setup 02/11] Remove unused package_status_t stored in packageversion class
- Authentication-results: sourceware.org; auth=none
- References: <20170428121205.12240-1-jon.turney@dronecode.org.uk>
The package installed/not installed status is tracked by the packagemeta
class, currently
---
cygpackage.cc | 3 ---
cygpackage.h | 6 ------
package_db.cc | 1 -
package_version.cc | 1 -
package_version.h | 9 ---------
5 files changed, 20 deletions(-)
diff --git a/cygpackage.cc b/cygpackage.cc
index cd4b6bd..14c0c98 100644
--- a/cygpackage.cc
+++ b/cygpackage.cc
@@ -36,7 +36,6 @@ packagev (),
canonical (),
sdesc (),
ldesc (),
-status (package_installed),
type (package_binary),
listdata (),
listfile ()
@@ -61,12 +60,10 @@ cygpackage::createInstance (const std::string& pkgname,
packageversion
cygpackage::createInstance (const std::string& pkgname,
const std::string& version,
- package_status_t const newstatus,
package_type_t const newtype)
{
cygpackage *temp = new cygpackage;
temp->name = pkgname;
- temp->status = newstatus;
temp->type = newtype;
temp->setCanonicalVersion (version);
return packageversion(temp);
diff --git a/cygpackage.h b/cygpackage.h
index 991072a..4c57b95 100644
--- a/cygpackage.h
+++ b/cygpackage.h
@@ -34,10 +34,6 @@ public:
virtual const std::string Vendor_version ();
virtual const std::string Package_version ();
virtual const std::string Canonical_version ();
- virtual package_status_t Status ()
- {
- return status;
- };
virtual package_type_t Type ()
{
return type;
@@ -72,7 +68,6 @@ public:
static packageversion createInstance (const std::string& pkgname,
const std::string& version,
- package_status_t const,
package_type_t const);
private:
@@ -86,7 +81,6 @@ private:
char getfilenamebuffer[CYG_PATH_MAX];
// package_stability_t stability;
- package_status_t status;
package_type_t type;
io_stream *listdata, *listfile;
diff --git a/package_db.cc b/package_db.cc
index ba1a561..a47fb11 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -107,7 +107,6 @@ packagedb::packagedb ()
packageversion binary =
cygpackage::createInstance (pkgname, f.ver,
- package_installed,
package_binary);
pkg->add_version (binary);
diff --git a/package_version.cc b/package_version.cc
index 8ed8ac8..1a4d041 100644
--- a/package_version.cc
+++ b/package_version.cc
@@ -45,7 +45,6 @@ public:
const std::string Package_version() {return std::string();}
const std::string Canonical_version() {return std::string();}
void setCanonicalVersion (const std::string& ) {}
- package_status_t Status (){return package_notinstalled;}
package_type_t Type () {return package_binary;}
const std::string getfirstfile () {return std::string();}
const std::string getnextfile () {return std::string();}
diff --git a/package_version.h b/package_version.h
index edfd15a..c271f73 100644
--- a/package_version.h
+++ b/package_version.h
@@ -57,13 +57,6 @@ package_stability_t;
typedef enum
{
- package_notinstalled,
- package_installed
-}
-package_status_t;
-
-typedef enum
-{
package_binary,
package_source
}
@@ -105,7 +98,6 @@ public:
const std::string Package_version () const;
const std::string Canonical_version () const;
void setCanonicalVersion (const std::string& );
- package_status_t Status () const;
package_type_t Type () const;
const std::string getfirstfile ();
const std::string getnextfile ();
@@ -165,7 +157,6 @@ public:
virtual const std::string Package_version () = 0;
virtual const std::string Canonical_version () = 0;
virtual void setCanonicalVersion (const std::string& ) = 0;
- virtual package_status_t Status () = 0;
// virtual package_stability_t Stability () = 0;
virtual package_type_t Type () = 0;
/* TODO: we should probably return a metaclass - file name & path & size & type
--
2.12.2