Bug 25496 - Traceback bei univention-updater cdrom wenn CDROM=aktuelle-Version (nextupdate=none)
Traceback bei univention-updater cdrom wenn CDROM=aktuelle-Version (nextupdat...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 2.4
Other Linux
: P5 normal (vote)
: UCS 3.0-1
Assigned To: Philipp Hahn
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-15 11:08 CET by Philipp Hahn
Modified: 2012-03-04 14:34 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
Handle nextversion=none (3.55 KB, patch)
2011-12-15 11:08 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-12-15 11:08:03 CET
Created attachment 4023 [details]
Handle nextversion=none

# ucr search --brief  ^version/
version/patchlevel: 1
version/releasename: golden beech
version/security-patchlevel: 1
version/version: 2.4

# grep nextupdate /cdrom/ucs-updates/ucs_2.4-?.txt
/cdrom/ucs-updates/ucs_2.4-0.txt:nextupdate=2.4-1
/cdrom/ucs-updates/ucs_2.4-1.txt:nextupdate=none

# univention-updater cdrom
Mounting cdrom /cdrom
mount: block device /dev/scd0 is write-protected, mounting read-only
mount: /dev/scd0 already mounted or /cdrom busy
mount: according to mtab, /dev/scd0 is already mounted on /cdrom
nextupdate=none

nextupdate=none
none
none
none
string does not match UCS version pattern
Traceback (most recent call last):
  File "/usr/sbin/univention-updater", line 640, in ?
    main()
  File "/usr/sbin/univention-updater", line 479, in main
    nextversion = update_available('cdrom', baseConfig, cdrom_mount_point,
iso=iso)
  File "/usr/sbin/univention-updater", line 270, in update_available
    ver = UCS_Version(nextversion)
  File "/usr/lib/python2.4/site-packages/univention/updater/tools.py", line 75,
in __init__
    self.set( version )
  File "/usr/lib/python2.4/site-packages/univention/updater/tools.py", line
107, in set
    raise AttributeError( 'string does not match UCS version pattern' )
AttributeError: string does not match UCS version pattern

Da sind ein paar zusätzliche Debug-Ausgaben drin.
Comment 1 Philipp Hahn univentionstaff 2011-12-16 21:06:28 CET
UCS_Version() ist nun in einem try-catch-Block.

svn29990, univention-updater_7.0.128-1.990.201112162052
ChangeLog: (svn11611)
\item A bug was fixed in \ucsCommand{univention-repository-update} when updading from a CD-ROM (\ucsBug{25496}).
Comment 2 Felix Botner univentionstaff 2012-02-23 17:20:55 CET
In UCS 3.0-0 gibt es kein univention-updater mehr, nur noch univention-upgrade. Dort sind aber keine try/except um das UCS_Version. 

Kann man das mit 3.0-0 überhaupt nachstellen? Spielt das überhaupt noch eine Rolle in 3.0-0?



-> ucr search --brief ^version
version/erratalevel: 0
version/patchlevel: 0
version/releasename: Horn-Lehe
version/security-patchlevel: <empty>
version/version: 3.0

-> grep nextupdate /mnt/ucs-updates/ucs_*
/mnt/ucs-updates/ucs_2.4-3.txt:nextupdate=3.0-0
/mnt/ucs-updates/ucs_3.0-0.txt:nextupdate=none

-> univention-upgrade --iso /opt/UCS_Update_2.4-4_-_3.0-0-i386.iso 

Starting univention-upgrade. Current UCS version is 3.0-0 errata0
Checking for local repository:                          found
Update the local repository via network [Y|n]? n
Update the local repository via cdrom [Y|n]? y
Copying packages. Please be patient ... 
Checking for release updates:                           none
Checking for package updates:                           none
Checking for errata updates:                            none
Comment 3 Philipp Hahn univentionstaff 2012-02-24 11:13:05 CET
(In reply to comment #2)
> In UCS 3.0-0 gibt es kein univention-updater mehr, nur noch univention-upgrade.

Doch, unter /usr/share/univention-updater/univention-updater, das dort auch von univention-upgrade (Zeilen 394ff) aufgerufen wird. Allerdings aktualisiert u-upgrade zuerst immer das lokale Depot und macht dann ein lokales Update, so daß der Code-Pfad, in dem der Traceback auftritt (direkt von CDROM aktualisieren) nicht genutzt wird.

> Kann man das mit 3.0-0 überhaupt nachstellen? Spielt das überhaupt noch eine
> Rolle in 3.0-0?

Ja, etwa so:
1. univention-repository-create -m /mnt -i UCS_3.0-0-amd64.iso # Bug #26239
2. ucr set version/patchlevel=0
3. In /usr/share/univention-updater/univention-updater:245 die 4 Zeilen auskommentieren:
                if nextversion:
#                       try:
                                ver = UCS_Version(nextversion)
#                       except ValueError, e:
#                               pass
#                       else:
                                mm_version = UCS_Version.FORMAT % ver
4. /usr/share/univention-updater/univention-updater cdrom  --iso UCS_Update_2.4-4_-_3.0-0-amd64.iso


Dabei ist noch ein Fehler aufgefallen: Statt AttributeError wird ein ValueError geworfen. Das wurde noch korrigiert.

svn31095, univention-updater_7.0.145-1.1014.201202241018
ChangeLog: ±0
ucs-test: OK
Comment 4 Felix Botner univentionstaff 2012-02-24 11:55:02 CET
OK
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2012-03-04 14:34:11 CET
UCS 3.0-1 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer
neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert
werden: "Clone This Bug"