From 6ffb7b501e4eaf505c9502b54de8dc1aa5a62b0a Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Thu, 21 Oct 1999 15:19:23 +0000 Subject: [PATCH] minor edits --- debian/rules | 8 +++++--- include/dpkg.h.in | 1 - lib/showcright.c | 5 ----- main/help.c | 21 --------------------- main/main.c | 2 -- 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/debian/rules b/debian/rules index 90509917..7acfd97c 100755 --- a/debian/rules +++ b/debian/rules @@ -133,11 +133,13 @@ binary-indep: binary-trees fi; \ dpkg-distaddfile -f$(DIR)/debian/files $$f.html.tar.gz byhand -; \ done - set -e; \ + set -e;\ version=`sed -n 's/^Version: //p' $(DIR)/debian/tmp-dev/DEBIAN/control`; \ file=dpkg-$${version}.tar.gz; \ - cp $(DIR)/../dpkg_$${version}.tar.gz $(DIR)/../$${file}; \ - dpkg-distaddfile -f$(DIR)/debian/files $${file} byhand -; + if [ -f $(DIR)/../dpkg_$${version}.tar.gz ]; then \ + cp $(DIR)/../dpkg_$${version}.tar.gz $(DIR)/../$${file}; \ + dpkg-distaddfile -f$(DIR)/debian/files $${file} byhand -; \ + fi binary-arch: binary-trees $(checkdir) diff --git a/include/dpkg.h.in b/include/dpkg.h.in index ecae1fa6..cef8dfb1 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -202,6 +202,5 @@ extern volatile int onerr_abort; struct cmdinfo; void showcopyright(const struct cmdinfo*, const char*); -char *libdpkgver(void); #endif /* DPKG_H */ diff --git a/lib/showcright.c b/lib/showcright.c index 037c5dbc..c327076b 100644 --- a/lib/showcright.c +++ b/lib/showcright.c @@ -24,7 +24,6 @@ #include #include -#include void showcopyright(const struct cmdinfo *c, const char *v) { int fd; @@ -34,7 +33,3 @@ void showcopyright(const struct cmdinfo *c, const char *v) { execlp(CAT,CAT,"-",(char*)0); ohshite(_("unable to exec cat for displaying GPL file")); } - -char *libdpkgver(void) { - return DPKG_VERSION; -} diff --git a/main/help.c b/main/help.c index 0c33ccb4..1c6b3e6f 100644 --- a/main/help.c +++ b/main/help.c @@ -505,24 +505,3 @@ void ensure_pathname_nonexisting(const char *pathname) { debug(dbg_eachfile,"ensure_pathname_nonexisting running rm -rf"); waitsubproc(c1,"rm cleanup",0); } - -void check_libver (void) { - int c; - if (!strcmp(DPKG_VERSION, libdpkgver())) return; - /* ooh, we have a version mismatch with the library, - * continue, but warn LOUDLY about possible problems. - */ - fprintf(stderr, _("\ -WARNING: A mismatch between dpkg and libdpkg.so has\n\ -been detected. Somehow, your system has a different\n\ -version of dpkg than the library that is uses. This\n\ -may not cause any problems, but it does reflect a\n\ -serious condition. You should really reinstall the dpkg\n\ -package before continuing.\n\ -\n\ -Press 'Q' to exit, any other key to continue: ")); - c= getc(stdin); - if (c == 'q' || c == 'Q') - ohshite(_("Quitting at user request")); - return; -} diff --git a/main/main.c b/main/main.c index a273d1ca..0a215758 100644 --- a/main/main.c +++ b/main/main.c @@ -396,8 +396,6 @@ int main(int argc, const char *const *argv) { umask(022); /* Make sure all our status databases are readable. */ - check_libver(); - for (argvs=argv+1; (argp= *argvs) && *argp++=='-'; argvs++) { if (*argp++=='-') { if (!strcmp(argp,"-")) break; -- 2.39.5