Explorar el Código

dpkg (1.2.5); priority=MEDIUM

  * Allow, but do not create, packages in half-installed state
    with no version number.  (Aargh.)

 -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Mon, 10 Jun 1996 04:55:43 +0100
Ian Jackson hace 30 años
padre
commit
b9b3d7d73f
Se han modificado 5 ficheros con 14 adiciones y 4 borrados
  1. 7 0
      debian.Changelog
  2. 1 1
      debian.rules
  3. 3 2
      lib/parse.c
  4. 2 0
      main/processarc.c
  5. 1 1
      version.h

+ 7 - 0
debian.Changelog

@@ -1,3 +1,10 @@
+dpkg (1.2.5); priority=MEDIUM
+
+  * Allow, but do not create, packages in half-installed state
+    with no version number.  (Aargh.)
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Mon, 10 Jun 1996 04:55:43 +0100
+
 dpkg (1.2.4); priority=MEDIUM
 
   * New dpkg-name from Erick (<pkg>_<version>_<arch>.deb convention).

+ 1 - 1
debian.rules

@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 package=dpkg
-version=1.2.4
+version=1.2.5
 
 archi=$(shell dpkg --print-architecture)
 DIR:=$(shell pwd)

+ 3 - 2
lib/parse.c

@@ -197,8 +197,9 @@ int parsedb(const char *filename, enum parsedbflags flags,
                      &newpifp->description, "description");
       parsemustfield(file,filename,lno, warnto,warncount,&newpig,1,
                      &newpifp->maintainer, "maintainer");
-      parsemustfield(file,filename,lno, warnto,warncount,&newpig,0,
-                     &newpifp->version.version, "version");
+      if (newpig.status != stat_halfinstalled)
+        parsemustfield(file,filename,lno, warnto,warncount,&newpig,0,
+                       &newpifp->version.version, "version");
     }
     if (flags & pdb_recordavailable)
       parsemustfield(file,filename,lno, warnto,warncount,&newpig,1,

+ 2 - 0
main/processarc.c

@@ -421,6 +421,8 @@ void process_archive(const char *filename) {
   }
 
   pkg->eflag |= eflagf_reinstreq;
+  if (pkg->status == stat_notinstalled)
+    pkg->installed.version= pkg->available.version;
   pkg->status= stat_halfinstalled;
   modstatdb_note(pkg);
   if (oldversionstatus == stat_notinstalled) {

+ 1 - 1
version.h

@@ -1 +1 @@
-#define DPKG_VERSION "1.2.4" /* This line modified by Makefile */
+#define DPKG_VERSION "1.2.5" /* This line modified by Makefile */