← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~smoser/maas/trunk-depend-on-distro-info into lp:maas

 

Scott Moser has proposed merging lp:~smoser/maas/trunk-depend-on-distro-info into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #949442 in cobbler (Ubuntu): "hard coded list of ubuntu release names, should use distro-info"
  https://bugs.launchpad.net/ubuntu/+source/cobbler/+bug/949442

For more details, see:
https://code.launchpad.net/~smoser/maas/trunk-depend-on-distro-info/+merge/101319

distro-info is now in main (LP: #964008), so it makes sense to use it to get a list of release names.
-- 
https://code.launchpad.net/~smoser/maas/trunk-depend-on-distro-info/+merge/101319
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~smoser/maas/trunk-depend-on-distro-info into lp:maas.
=== modified file 'scripts/maas-import-isos'
--- scripts/maas-import-isos	2012-04-03 04:03:28 +0000
+++ scripts/maas-import-isos	2012-04-10 02:26:24 +0000
@@ -28,35 +28,10 @@
 	exit 1
 fi
 
-distro_info() {
-   # we would like to use distro-info, but cannot (LP: #960142)
-   # if it is there, we will use it. if not, we have a behave-alike
-   # that will need SRUs to get new release knowledge
-   if command -v distro-info >/dev/null; then
-      distro-info "$@"
-      return
-   fi
-
-   local supported="hardy lucid maverick natty oneiric precise"
-   local devel="precise"
-   local stable="oneiric"
-   [ "$(date +%Y%m%d)" -lt 20120426 ] || stable="precise"
-
-   case "$1" in
-      --devel) echo "$devel";;
-      --stable) echo "$stable";;
-      --supported) 
-         local d;
-         for d in $supported; do echo "$d"; done
-         ;;
-      *) echo "unknown argument $1"; return 1;;
-   esac
-}
-
 # Definitions for supported releases and architectures
 [ -r $(pwd)/etc/maas/import_isos ] && . $(pwd)/etc/maas/import_isos
 [ -r /etc/maas/import_isos ] && . /etc/maas/import_isos
-[ -n "$RELEASES" ] || RELEASES=$(distro_info --supported)
+[ -n "$RELEASES" ] || RELEASES=$(distro-info --supported)
 [ -n "$ARCHES" ] || ARCHES="amd64 i386"
 [ -n "$KSDIR" ] || KSDIR="/var/lib/cobbler/kickstarts"
 [ -n "$PRIORITY" ] || PRIORITY="critical"
@@ -121,8 +96,8 @@
 }
 
 add_enlist_profile(){
-        STABLE=$(distro_info --stable)
-        DEVEL=$(distro_info --devel)
+        STABLE=$(distro-info --stable)
+        DEVEL=$(distro-info --devel)
         PARENT_PROFILE=""
 
         # Check what release to use as parent profile


Follow ups