|fL 8ddlmZmZdZdZdZdZdZdZy) ) SourceEntryDeb822SourceEntryct|tr tt||jSt t||jS)z, Return a shallow copy of the source entry. )file) isinstancerstrrr)origs @/usr/lib/python3/dist-packages/softwareproperties/sourceutils.pycopy_source_entryr s7$)* T;; s4ytyy 11c ft|}|jD]\}}t||||S)z?Return a copy of the given source entry with replaced field(s).)r itemssetattr)r kwargsentrykvs r replace_source_entryr s6 d #E,,.Aq! Lr cf|jjd}|dxsdjS)zl Return the pocket, or if unset return 'release'. This always returns the pocket in lowercase. -release)dist partitionlower) source_entrypartss r get_source_entry_pocketrs2    ' ' ,E !H ! ( ( **r c>|jjddS)z\ Return the suite, without pocket. This always returns the suite in lowercase. rr)rr)rs r get_source_entry_suiter s    & &s +A ..r ct|t|j}|D])}t|t|j|k(s'|cSy)a Return the source entry from entries that matches entry, if found. Otherwise return None. This function uses a modified equality check, i.e. it considers components as a set rather than a list so that different ordering does not affect the comparison. )compsN)rsetr")entriesrtargetes r get_source_entry_from_listr'"sI"%s5;;/? @F  QWW 6& @H r c|j|jk7rydD]/}tt||tt||z s/yy)a\ Return True if the source defined by b is already satisfied by the source defined by a. For example, if source a is: Types: deb URIs: http://archive.ubuntu.com/ubuntu Suites: jammy Components: main universe and source b is: Types: deb URIs: http://archive.ubuntu.com/ubuntu Suites: jammy Components: universe Then source a contains source b. But if source b was: Types: deb-src URIs: http://archive.ubuntu.com/ubuntu Suites: jammy Components: universe Then a does not contain b because it does not include deb-src. F)typesr"suitesurisT)disabledr#getattr)abattrs r deb822_source_entry_containsr13sN< zzQZZ4 wq$ 3wq$'7#8 8 r N) aptsources.sourceslistrrr rrr r'r1r r r4s&C2+/"%r