Univention Bugzilla – Attachment 4360 Details for
Bug 26983
Update dauert durch errata Updates sehr lange
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Skip empty Packages files
26983_updater-skip-empty.diff (text/plain), 4.08 KB, created by
Philipp Hahn
on 2012-05-08 16:52:59 CEST
(
hide
)
Description:
Skip empty Packages files
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2012-05-08 16:52:59 CEST
Size:
4.08 KB
patch
obsolete
>diff --git a/branches/ucs-3.0/ucs/base/univention-updater/debian/changelog b/branches/ucs-3.0/ucs/base/univention-updater/debian/changelog >index eb16755..0e71ba0 100644 >--- a/branches/ucs-3.0/ucs/base/univention-updater/debian/changelog >+++ b/branches/ucs-3.0/ucs/base/univention-updater/debian/changelog >@@ -1,3 +1,9 @@ >+univention-updater (7.0.156-1) unstable; urgency=low >+ >+ * Skip using empty Packages (Bug #26983) >+ >+ -- Philipp Hahn <hahn@univention.de> Tue, 08 May 2012 16:48:06 +0200 >+ > univention-updater (7.0.155-1) unstable; urgency=low > > * disable restart of UMC webserver in preup.sh (Bug #26298) >diff --git a/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/tools.py b/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/tools.py >index 4861182..ba7c267 100644 >--- a/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/tools.py >+++ b/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/tools.py >@@ -60,6 +60,8 @@ import shutil > RE_ALLOWED_DEBIAN_PKGNAMES = re.compile('^[a-z0-9][a-z0-9.+-]+$') > RE_SPLIT_MULTI = re.compile('[ ,]+') > >+MIN_GZIP = 100 # size of non-empty gzip file >+ > class UCS_Version( object ): > '''Version object consisting of major-, minor-number and patch-level''' > FORMAT = '%(major)d.%(minor)d' >@@ -346,7 +348,10 @@ class UCSHttpServer(object): > try: > res = UCSHttpServer.opener.open(req) > try: >- return (res.code, res.read()) >+ code = res.code >+ size = int(res.headers.get('content-length', 0)) >+ content = res.read() >+ return (code, size, content) > finally: > res.close() > # direct | proxy | Error cause >@@ -957,8 +962,9 @@ class UniventionUpdater: > found_patchlevel = True > for ver.arch in archs: # architecture > try: >- assert server.access(ver.path()) >- yield ver >+ code, size, content = server.access(ver.path()) >+ if size > MIN_GZIP: >+ yield ver > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e) > del ver.arch >@@ -1091,8 +1097,9 @@ class UniventionUpdater: > if self.sources: > ver.arch = "source" > try: >- assert server.access(ver.path("Sources.gz")) >- result.append( ver.deb("deb-src") ) >+ code, size, content = server.access(ver.path("Sources.gz")) >+ if size > MIN_GZIP: >+ result.append(ver.deb("deb-src")) > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e) > >@@ -1139,8 +1146,9 @@ class UniventionUpdater: > if self.sources: > ver.arch = "source" > try: >- assert server.access(ver.path("Sources.gz")) >- result.append( ver.deb("deb-src") ) >+ code, size, content = server.access(ver.path("Sources.gz")) >+ if size > MIN_GZIP: >+ result.append(ver.deb("deb-src")) > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e) > >@@ -1194,8 +1202,9 @@ class UniventionUpdater: > if self.sources: > ver.arch = "source" > try: >- assert server.access(ver.path("Sources.gz")) >- result.append( ver.deb("deb-src") ) >+ code, size, content = server.access(ver.path("Sources.gz")) >+ if size > MIN_GZIP: >+ result.append(ver.deb("deb-src")) > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e) > >@@ -1371,8 +1380,9 @@ class UniventionUpdater: > if self.sources: > ver.arch = "source" > try: >- assert server.access(ver.path("Sources.gz")) >- result.append( ver.deb("deb-src") ) >+ code, size, content = server.access(ver.path("Sources.gz")) >+ if size > MIN_GZIP: >+ result.append(ver.deb("deb-src")) > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e) > >@@ -1563,7 +1573,7 @@ class UniventionUpdater: > path = struct.path(name) > ud.debug(ud.ADMIN, ud.ALL, "Accessing %s" % path) > try: >- code, script = server.access(path, get=True) >+ code, size, script = server.access(path, get=True) > yield server, struct, phase, path, script > except DownloadError, e: > ud.debug(ud.NETWORK, ud.ALL, "%s" % e)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26983
: 4360